<template>
<!-- 筛选页面 -->
  <div>
       <!-- 顶部的蓝色导航 -->
    <uni-nav-bar  title="筛选" class="navbar" backgroundColor="#1482f5" statusBar="true" color="white">
        <view slot="left">
        <text class="iconfont icon-left" @click="yback"></text>
        </view>
    </uni-nav-bar>

        <!-- 筛选部分 -->
    <div class="screening">
        <div class="screeningleft">
            <span @click="yclickarea">区域<span class="iconfont icon-iconfontarrowup" style="font-size: 10px;color: #9999;"></span></span>
            <span @click="yclickprice">均价<span class="iconfont icon-iconfontarrowup" style="font-size: 10px;color: #9999;"></span></span>
            <span @click="yclickhousemodel">户型<span class="iconfont icon-iconfontarrowup" style="font-size: 10px;color: #9999;"></span></span>
            <span style="color: #ff9900;">筛选<span class="iconfont icon-iconfontarrowup" style="font-size: 10px;color: #9999;"></span></span>
        </div>
        <div class="screeningright">
            <span class="iconfont icon-paixu" style="font-size:18px;"></span>
        </div>
    </div>

    <!-- 筛选选项 -->
    <div class="houseclass">
     <div class="housemodel">
         <div>验真情况</div>
         <div class="ymain">
            <span v-for="(item,index) in buyhousemodel" :key="index">{{item}}</span>
         </div>
     </div>
     <div class="housemodel">
         <div>朝向</div>
         <div class="ymain">
             <span v-for="(item,index) in housenumber" :key="index">{{item}}</span>
         </div>
     </div>
    </div>
<van-button type="danger" @click="ok">确认</van-button>
  </div>
</template>

<script>
import {uniNavBar} from '@dcloudio/uni-ui';
export default {
components: {uniNavBar},
data() {
    return {
       buyhousemodel:['不限','新房','二手房'],
       housenumber:['不限','1室','2室','3室','3室+',]
           }
},
methods: {
  // 返回
    yback(){
     wx.navigateBack()
  },
  // 点击区域
    yclickarea(){
       wx.redirectTo({
                url:"/pages/yarea/index"
            })
    },
    // 点击均价
    yclickprice(){
         wx.redirectTo({
                url:"/pages/yprice/index"
            })
    },
    // 点击户型
    yclickhousemodel(){
        wx.redirectTo({
                url:"/pages/yhousemodel/index"
            })
    },
      // 点击确认按钮
    ok(){
      wx.navigateBack()
    },
},
}
</script>

<style lang="scss">
 @import "../../y_icon/iconfont.css";
 /* 筛选部分的样式 */
.screening{
    display: flex;
    height: 30px;
    align-items: center;
    border-bottom: 1px solid #000;
    .screeningright{
        width: 50px;
        text-align:center;
    }
    .screeningleft{
        width: calc(100% - 50px);
        display: flex;
        justify-content: space-around;
    }
}
// 房型样式
.houseclass{
  width: 100%;
  height: 430px;
  display: flex;
  flex-direction: column;
  align-items: center;
  .housemodel{
      width: 100%;
      height: 100px;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      .ymain{
          margin-top: 10px;
      }
      .ymain>span{
          display: inline-block;
          width: 50px;
          text-align: center;
          line-height: 30px;
          margin-right: 10px;
          height: 30px;
          background-color: #9f9f9f;
      }
  }
}

.van-button{
  width: 100% !important;
}
</style>